function iframeBrush(mobile,channel,game){
    if(channel=='wechat'){
        var url = 'https://www.shandong10086.com/flushService/wechatLogin/wczx.do?phone='
        if(game=='wxfruit'||game=='tiger'||game=='WechatBusiness'){
            url = 'https://www.shandong10086.com/flushService/wechatLogin/wczx.do?phone='
        }
    }else if(channel=='app'){
        var url = 'https://www.shandong10086.com/flushService/appLogin/wczx.do?phone='
    }    
    var str = '<iframe src="'+url+mobile+'&gameName='+game+'" frameborder="0" scrolling="auto" style="display:none"></iframe>'
    $('body').append(str)
}

function rule(nowUrl,nextUrl,gameName,exchangNow){
    var month = new Date().getMonth();
    if(exchangNow==1){
        localStorage.setItem(gameName+'month',month)
        localStorage.setItem(gameName+'url',nowUrl)
        return nowUrl;
    }
    if(localStorage.getItem(gameName+'month')){
        if(localStorage.getItem(gameName+'month')==month){
            return  localStorage.getItem(gameName+'url');
        }else{
            localStorage.setItem(gameName+'url',nextUrl)
            localStorage.setItem(gameName+'month',month)
            return nextUrl;
        }
    }else{
        localStorage.setItem(gameName+'month',month)
        localStorage.setItem(gameName+'url',nowUrl)
        return nowUrl;
    }
}


//插码
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
  var u="//m.sd.10086.cn/piwik/";
  _paq.push(['setTrackerUrl', u+'piwik.php']);
  _paq.push(['setSiteId', '2']);
  var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();